<template>
    <div>
        <van-skeleton :row="3" v-if="web" />
        <van-nav-bar title="首页" left-text="返回" left-arrow @click-left="onClickLeft" />
        <van-tabs v-model:active="active">
            <van-tab title="标签 1"></van-tab>
            <van-tab title="标签 2"></van-tab>
            <van-tab title="标签 3"></van-tab>
            <van-tab title="标签 4"></van-tab>
        </van-tabs>
        <van-search v-model="value" placeholder="请输入搜索关键词" />
        <van-swipe :autoplay="3000" lazy-render>
            <van-swipe-item v-for="image in images" :key="image">
                <img :src="image" style="width: 100%;height: 200px;" />
            </van-swipe-item>
        </van-swipe>
        <van-grid :column-num="4">
            <van-grid-item v-for="value in catitems" :icon="value.image_src" :text="value.name" />
        </van-grid>
        <div v-for="item in floordata">
            <img :src="item.floor_title.image_src" alt="">
            <div v-for="items in  product_list">
                <img :src="items.image_src" alt="">
            </div>
        </div>
    </div>
</template>

<script setup>
const images = [
    'https://fastly.jsdelivr.net/npm/@vant/assets/apple-1.jpeg',
    'https://fastly.jsdelivr.net/npm/@vant/assets/apple-2.jpeg',
    'https://fastly.jsdelivr.net/npm/@vant/assets/apple-3.jpeg',
    'https://fastly.jsdelivr.net/npm/@vant/assets/apple-4.jpeg',
];
import { ref } from 'vue';
let web=true;
setTimeout(()=>{
   web=false
},2000)
import {catitemsApi,floordataApi} from '@/api/api'
 let catitems=ref([])
catitemsApi().then(res=>{
    console.log('导航数据',res);
    catitems.value=res.data.message
})
let floordata=ref([])
floordataApi().then(res=>{
    console.log('楼层数据',res);
    floordata.value=res.data.message
})
</script>

<style lang="scss" scoped></style>